<!DOCTYPE HTML PUBLIC "-//ORA//DTD CD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>[Chapter 13] 13.5 Reserved Words</TITLE>
<META NAME="author" CONTENT="David Flanagan">
<META NAME="date" CONTENT="Thu Jul 31 16:01:05 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="Java">
<META NAME="title" CONTENT="Java in a Nutshell">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Java in a Nutshell" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch13_04.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Chapter 13<br>Java Syntax</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch13_06.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<DIV CLASS=sect1>
<h2 CLASS=sect1><A CLASS="TITLE" NAME="JNUT2-CH-13-SECT-5">13.5 Reserved Words</A></h2>

<P CLASS=para>
<A NAME="CH13.RESERVED.WOR1"></A><A NAME="CH13.PROGRAMMING.1"></A><A HREF="ch13_05.htm#JNUT2-CH-13-TAB-6">Table 13.6</A>
lists reserved words in Java.  These are keywords or
<tt CLASS=literal>boolean</tt> literal values.  Note that <tt CLASS=literal>byvalue</tt>,
<tt CLASS=literal>cast</tt>, <tt CLASS=literal>const</tt>, <tt CLASS=literal>future</tt>,
<tt CLASS=literal>generic</tt>, <tt CLASS=literal>goto</tt>, <tt CLASS=literal>inner</tt>,
<tt CLASS=literal>operator</tt>, <tt CLASS=literal>outer</tt>, <tt CLASS=literal>rest</tt>, and
<tt CLASS=literal>var</tt> are reserved by Java but currently unused.

<P>
<DIV CLASS=table>
<TABLE BORDER>
<CAPTION><A CLASS="TITLE" NAME="JNUT2-CH-13-TAB-6">Table 13.6: Java Reserved Words</A></CAPTION>
<TR CLASS=row>
<TD ALIGN="left">abstract</TD>
<TD ALIGN="left">default</TD>
<TD ALIGN="left">goto</TD>
<TD ALIGN="left">operator</TD>
<TD ALIGN="left">synchronized</TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">boolean</TD>
<TD ALIGN="left">do</TD>
<TD ALIGN="left">if</TD>
<TD ALIGN="left">outer</TD>
<TD ALIGN="left">this</TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">break</TD>
<TD ALIGN="left">double</TD>
<TD ALIGN="left">implements</TD>
<TD ALIGN="left">package</TD>
<TD ALIGN="left">throw</TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">byte</TD>
<TD ALIGN="left">else</TD>
<TD ALIGN="left">import</TD>
<TD ALIGN="left">private</TD>
<TD ALIGN="left">throws</TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">byvalue</TD>
<TD ALIGN="left">extends</TD>
<TD ALIGN="left">inner</TD>
<TD ALIGN="left">protected</TD>
<TD ALIGN="left">transient</TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">case</TD>
<TD ALIGN="left">false</TD>
<TD ALIGN="left">instanceof</TD>
<TD ALIGN="left">public</TD>
<TD ALIGN="left">true</TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">cast</TD>
<TD ALIGN="left">final</TD>
<TD ALIGN="left">int</TD>
<TD ALIGN="left">rest</TD>
<TD ALIGN="left">try</TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">catch</TD>
<TD ALIGN="left">finally</TD>
<TD ALIGN="left">interface</TD>
<TD ALIGN="left">return</TD>
<TD ALIGN="left">var</TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">char</TD>
<TD ALIGN="left">float</TD>
<TD ALIGN="left">long</TD>
<TD ALIGN="left">short</TD>
<TD ALIGN="left">void</TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">class</TD>
<TD ALIGN="left">for</TD>
<TD ALIGN="left">native</TD>
<TD ALIGN="left">static</TD>
<TD ALIGN="left">volatile</TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">const</TD>
<TD ALIGN="left">future</TD>
<TD ALIGN="left">new</TD>
<TD ALIGN="left">super</TD>
<TD ALIGN="left">while</TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">continue</TD>
<TD ALIGN="left">generic</TD>
<TD ALIGN="left">null</TD>
<TD ALIGN="left">switch</TD>
<TD ALIGN="left">&nbsp;</TD>
</TR>
</TABLE>
<P>
</DIV>
<DIV CLASS=sect2>
<h3 CLASS=sect2><A CLASS="TITLE" NAME="JNUT2-CH-13-SECT-5.1">Reserved Method Names</A></h3>

<P CLASS=para>
<A HREF="ch13_05.htm#JNUT2-CH-13-TAB-7">Table 13.7</A>
lists the method names of the <tt CLASS=literal>Object</tt> class.
Strictly speaking, these method names are not reserved, but
since the methods are inherited by every class, they should
not be used as the name of a method, except when
intentionally overriding an <tt CLASS=literal>Object</tt> method.

<P>
<DIV CLASS=table>
<TABLE BORDER>
<CAPTION><A CLASS="TITLE" NAME="JNUT2-CH-13-TAB-7">Table 13.7: Reserved Method Names</A></CAPTION>
<TR CLASS=row>
<TD ALIGN="left">clone</TD>
<TD ALIGN="left">getClass</TD>
<TD ALIGN="left">notifyAll</TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">equals</TD>
<TD ALIGN="left">hashCode</TD>
<TD ALIGN="left">toString</TD>
</TR>
<TR CLASS=row>
<TD ALIGN="left">finalize</TD>
<TD ALIGN="left">notify</TD>
<TD ALIGN="left">wait</TD>
</TR>
</TABLE>
<P>
</DIV>
</DIV>

</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch13_04.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch13_06.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>Modifiers</td>
<td width=171 align=center valign=top><a href="index/idx_0.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>Java Documentation Comment Syntax</td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
